All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class javax.media.j3d.SceneGraphPath

java.lang.Object
   |
   +----javax.media.j3d.SceneGraphPath

public class SceneGraphPath
extends Object
A SceneGraphPath object represents a path from an object to a BranchGroup or Locale. During Picking and Intersect tests the user specifies the subtree of the scene graph that should be tested. The whole tree for a locale is searched by providing the locale to the Pick/Intersect tests. The SceneGraphPath object represents all the components in the subgraph which have the capability ENABLE_PICK_REPORTING set between the root of the subtree and the Picked/Intersected object. ENABLE_PICK_REPORTING is disabled by default.

See Also:
ENABLE_PICK_REPORTING, pickAll, pickAllSorted, pickClosest, pickAny

Constructor Index

 o SceneGraphPath()
Constructs a new SceneGraphPath object.
 o SceneGraphPath(Locale, Node)
Constructs a new SceneGraphPath object.
 o SceneGraphPath(Locale, Node[], Node)
Constructs a new SceneGraphPath object.

Method Index

 o equals(SceneGraphPath)
Returns true if all of the data members of path testPath are equal to the corresponding data members in this SceneGraphPath.
 o getLocale()
Retrieves the path's Locale
 o getNode(int)
Returns the node associated with the specified index.
 o getObject()
Retrieves the path's object.
 o hashCode()
Returns a hash number based on the data values in this object.
 o nodeCount()
Returns the number of nodes in this path.
 o set(SceneGraphPath)
Sets this path's values to that of the specified path
 o setLocale(Locale)
Sets this path's locale to the specified locale.
 o setNode(int, Node)
Replaces the node with the specified index with newNode.
 o setNodes(Node[])
Sets this path's node object to those specified object.
 o setObject(Node)
Sets this path's object to the specified object.
 o toString()
Returns a string representation of this object The string contains the class names of all Nodes in the SceneGraphPath

Constructors

 o SceneGraphPath
 public SceneGraphPath()
Constructs a new SceneGraphPath object.

 o SceneGraphPath
 public SceneGraphPath(Locale root,
                       Node object)
Constructs a new SceneGraphPath object.

Parameters:
root - the path's initial Locale object
object - the object in question
Throws: IllegalArgumentException
if object is other than a Group, Shape3D, or Morph node.
 o SceneGraphPath
 public SceneGraphPath(Locale root,
                       Node nodes[],
                       Node object)
Constructs a new SceneGraphPath object.

Parameters:
root - the path's initial Locale object
nodes - an array of node objects consisting of all nodes seprating the locale from the object in question (node[0] is the node closest to the object, while node[node.length] is the node closest to subtree root or locale)
object - the object in question.
Throws: IllegalArgumentException
if object is other than a Group, Shape3D, or Morph node.

Methods

 o set
 public final void set(SceneGraphPath newPath)
Sets this path's values to that of the specified path

Parameters:
newPath - the SceneGraphPath to copy
 o setLocale
 public final void setLocale(Locale newLocale)
Sets this path's locale to the specified locale.

Parameters:
newLocale - The new locale
 o setObject
 public final void setObject(Node object)
Sets this path's object to the specified object.

Parameters:
object - the new object
Throws: IllegalArgumentException
if object is other than a Group, Shape3D, or Morph node.
 o setNodes
 public final void setNodes(Node nodes[])
Sets this path's node object to those specified object.

Parameters:
nodes - the new nodes
 o setNode
 public final void setNode(int index,
                           Node newNode)
Replaces the node with the specified index with newNode.

Parameters:
index - the index of the node to replace
newNode - the new node
 o getLocale
 public final Locale getLocale()
Retrieves the path's Locale

Returns:
this path's Locale
 o getObject
 public final Node getObject()
Retrieves the path's object.

Returns:
the path's object
 o nodeCount
 public final int nodeCount()
Returns the number of nodes in this path.

Returns:
a count of the number of nodes in this path
 o getNode
 public final Node getNode(int index)
Returns the node associated with the specified index.

Parameters:
index - the index specifying which node to retrieve
Returns:
the specified object.
 o equals
 public boolean equals(SceneGraphPath testPath)
Returns true if all of the data members of path testPath are equal to the corresponding data members in this SceneGraphPath.

Parameters:
testPath - the path we will compare this object's path against.
Returns:
true or false
 o hashCode
 public int hashCode()
Returns a hash number based on the data values in this object. Two different SceneGraphPath objects with identical data values (ie, returns true for trans.equals(SceneGraphPath) ) will return the same hash number. Two Paths with different data members may return the same hash value, although this is not likely.

Returns:
the integer hash value
Overrides:
hashCode in class Object
 o toString
 public String toString()
Returns a string representation of this object The string contains the class names of all Nodes in the SceneGraphPath

Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index